import { IsArray, IsInstance, IsNotEmpty, IsString, IsUUID } from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";
import { Type } from 'class-transformer';

class EvaluationDataBatchDtoItem{
  @IsNotEmpty()
  @ApiProperty()
  @IsUUID()
  evaluationUuid: string;

  @IsNotEmpty()
  @ApiProperty()
  @IsUUID()
  projectUuid: string;

  @IsNotEmpty()
  @ApiProperty()
  @IsString()
  group: string;
}
export class EvaluationDataBatchDto {
  @IsNotEmpty()
  @ApiProperty({
    type: [EvaluationDataBatchDtoItem],
  })
  @IsArray()
  @IsInstance(EvaluationDataBatchDtoItem,{each: true})
  @Type(()=>EvaluationDataBatchDtoItem)
  list: EvaluationDataBatchDtoItem[];
}
